package com.elitect.ftptransfer.network;

import java.util.List;

import org.apache.commons.net.ftp.FTPFile;

/**
 * The network listener for connect to FTP server
 * 
 * @author NgocTan
 * 
 */
public interface OnFTPConnectListener
{
    /**
     * Call when connection lost
     */
    void onFtpDisconnect();
    
    /**
     * Call when login successful
     */
    void onFtpLoginSuccess();

    /**
     * Call when login fail
     */
    void onFtpLoginFail();

    /**
     * Call when connect successful
     */
    void onFtpConnectSuccess();

    /**
     * Call when connect fail
     */
    void onFtpConnectFail();

    /**
     * Call when load files done from FTP server
     * 
     * @param path
     *            the path name of the directory of FTP server will be loaded
     *            files
     * @param ftpFiles
     *            the array of {@link FTPFile} to be loaded
     */
    void onFtpLoadedFiles(String path, FTPFile[] ftpFiles);

    /**
     * Call when upload files done to FTP server
     * 
     * @param listSucessUploadFiles
     *            the list of string of file names that uploaded successfully
     * @param listFailUploadFiles
     *            the list of string of file names that uploaded fail
     */
    void onFtpUploaded(List<String> listSucessUploadFiles,
            List<String> listFailUploadFiles);

    /**
     * Call when download files done from FTP server
     * 
     * @param listSucessDownloadFiles
     *            the list of string of file names that downloaded successfully
     * @param listFailDownloadFiles
     *            the list of string of file names that downloaded fail
     */
    void onFtpDownloaded(List<String> listSucessDownloadFiles,
            List<String> listFailDownloadFiles);

    /**
     * Call when create folder successful on FTP server
     */
    void onFtpCreateFolderSuccessful();

    /**
     * Call when create folder fail on FTP server
     */
    void onFtpCreateFolderFail();

    void onFtpLoadFilesFail();

    void onFtpUploadFailAll();
    
    void onFtpDownloadFailAll();
}
